﻿#region Header
/********************************************************           
 * StatusMessage      
 *                                                         
 * Author:  Richard Barclay  (phphanatic at gmail dot com) 
 * 
 * Copyright: 2009 Richard Barclay
 * 
 * License: GNU General Public License (GPL)
 *     
 * This file is part of the Intergr8.GoogleVisualization library.
 *
 *   The Intergr8.GoogleVisualization library is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *  Intergr8.GoogleVisualization library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with Intergr8.GoogleVisualization library.  If not, see <http://www.gnu.org/licenses/>.
 *                                                         
 * Purpose:  Generate an Error status message
 *                                                         
 * Usage:                                                  
 *      Factory methods for generating known errors
 *     
 *      
 ********************************************************/
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace Intergr8.GoogleVisualization
{
    internal class ErrorMessage : StatusMessage
    {

        internal static StatusMessage NotModified(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("not_modified", message, detailed_message);
            return msg;
        }

        internal static StatusMessage UserNotAuthenticated(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("user_not_authenticated", message, detailed_message);
            return msg;
        }

        internal static StatusMessage UnknownDataSourceID(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("unknown_data_source_id", message, detailed_message);
            return msg;
        }

        internal static StatusMessage AccessDenied(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("access_denied", message, detailed_message);
            return msg;
        }

        internal static StatusMessage UnsuportedQueryOperation(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("unsupported_query_operation", message, detailed_message);
            return msg;
        }

        internal static StatusMessage InvalidQuery(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("invalid_query", message, detailed_message);
            return msg;
        }

        internal static StatusMessage InvalidRequest(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("invalid_request", message, detailed_message);
            return msg;
        }

        internal static StatusMessage InternalError(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("internal_error", message, detailed_message);
            return msg;
        }

        internal static StatusMessage NotSupported(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("not_supported", message, detailed_message);
            return msg;
        }

        internal static StatusMessage IllegalFormattingPatterns(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("illegal_formatting_patterns", message, detailed_message);
            return msg;
        }

        internal static StatusMessage Other(string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage("other", message, detailed_message);
            return msg;
        }

        internal static StatusMessage Error(string reason, string message, string detailed_message)
        {
            StatusMessage msg = new StatusMessage(reason, message, detailed_message);
            return msg;
        }
        
    }
}
